const { Schema, model } = require("mongoose");
const testedSchema = new Schema(
  {
    studentId: {
      // 所属学员 _id
      type: Schema.Types.ObjectId,
      ref: "studentsModel",
    },
    testId: {
      // 关联试卷 _id
      type: Schema.Types.ObjectId,
      ref: "testsModel",
    },
    score: String, // 成绩
    stuAnswer:String,//学生选择的答案,数组转化为JSON字符串
    testTime:String,//考试用时
    total:String//试卷总分
  },
  { versionKey: false }
);
// 配置数据模型
const testedModel = model("testedModel", testedSchema, "testeds");
//module.exports.classesModel = classesModel;
module.exports = {
  testedModel,
};
